import hashlib
import os
class Fileinfo:

    def __init__(self, file = None):
        self.file = os.path.join(file)


    def hash(self):
        m = hashlib.md5()
        with open(self.file, buffering=1024) as file:
            for line in file:
                m.update(line.encode("utf-8"))

        self.hash = m.hexdigest()
        self.hash_int = int(self.hash, 16)
        print(self.hash_int)
        return m.hexdigest()




if __name__ == '__main__':
    fileinfo = Fileinfo("./Node.py")
    hash = fileinfo.hash()
    print(hash)